package com.lifeng.springevent;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Created by lifeng on 2019/8/5.
 * 监听某个事件 方式1
 */
@Component
public class SubmitOrderListener1 implements ApplicationListener<SubmitOrderEvent1>{
    private static final Logger log = LoggerFactory.getLogger(SubmitOrderListener1.class);

	@Override
	public void onApplicationEvent(SubmitOrderEvent1 event) {
		System.out.println(event);
	}

}
